﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Teigha.Core;

namespace Teigha.TD
{
	public class OdDbMLeaderStyle : OdDbObject
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdDbMLeaderStyle(IntPtr cPtr, bool cMemoryOwn) : base(TD_DbPINVOKE.OdDbMLeaderStyle_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdDbMLeaderStyle obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdDbMLeaderStyle()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							TD_DbPINVOKE.delete_OdDbMLeaderStyle(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdDbMLeaderStyle cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbMLeaderStyle_cast(OdRxObject.getCPtr(pObj));
			OdDbMLeaderStyle result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbMLeaderStyle)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbMLeaderStyle)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbMLeaderStyle)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbMLeaderStyle_desc(), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbMLeaderStyle_isA(this.swigCPtr), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbMLeaderStyle_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdDbMLeaderStyle createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbMLeaderStyle_createObject();
			OdDbMLeaderStyle result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbMLeaderStyle)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbMLeaderStyle)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbMLeaderStyle)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDatabaseDefaults(OdDbDatabase pDb)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setDatabaseDefaults(this.swigCPtr, OdDbDatabase.getCPtr(pDb));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual string getName()
		{
			string result = TD_DbPINVOKE.OdDbMLeaderStyle_getName(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setName(string name)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setName(this.swigCPtr, name);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual string description()
		{
			string result = TD_DbPINVOKE.OdDbMLeaderStyle_description(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setDescription(string description)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setDescription(this.swigCPtr, description);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual uint bitFlags()
		{
			uint result = TD_DbPINVOKE.OdDbMLeaderStyle_bitFlags(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public virtual void setBitFlags(uint flags)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setBitFlags(this.swigCPtr, flags);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setContentType(OdDbMLeaderStyle.ContentType contentType)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setContentType(this.swigCPtr, (int)contentType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.ContentType contentType()
		{
			OdDbMLeaderStyle.ContentType result = (OdDbMLeaderStyle.ContentType)TD_DbPINVOKE.OdDbMLeaderStyle_contentType(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDrawMLeaderOrderType(OdDbMLeaderStyle.DrawMLeaderOrderType drawMLeaderOrderType)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setDrawMLeaderOrderType(this.swigCPtr, (int)drawMLeaderOrderType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.DrawMLeaderOrderType drawMLeaderOrderType()
		{
			OdDbMLeaderStyle.DrawMLeaderOrderType result = (OdDbMLeaderStyle.DrawMLeaderOrderType)TD_DbPINVOKE.OdDbMLeaderStyle_drawMLeaderOrderType(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDrawLeaderOrderType(OdDbMLeaderStyle.DrawLeaderOrderType drawLeaderOrderType)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setDrawLeaderOrderType(this.swigCPtr, (int)drawLeaderOrderType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.DrawLeaderOrderType drawLeaderOrderType()
		{
			OdDbMLeaderStyle.DrawLeaderOrderType result = (OdDbMLeaderStyle.DrawLeaderOrderType)TD_DbPINVOKE.OdDbMLeaderStyle_drawLeaderOrderType(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setMaxLeaderSegmentsPoints(int maxLeaderSegmentsPoints)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setMaxLeaderSegmentsPoints(this.swigCPtr, maxLeaderSegmentsPoints);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public int maxLeaderSegmentsPoints()
		{
			int result = TD_DbPINVOKE.OdDbMLeaderStyle_maxLeaderSegmentsPoints(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setFirstSegmentAngleConstraint(OdDbMLeaderStyle.SegmentAngleType angle)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setFirstSegmentAngleConstraint(this.swigCPtr, (int)angle);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.SegmentAngleType firstSegmentAngleConstraint()
		{
			OdDbMLeaderStyle.SegmentAngleType result = (OdDbMLeaderStyle.SegmentAngleType)TD_DbPINVOKE.OdDbMLeaderStyle_firstSegmentAngleConstraint(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setSecondSegmentAngleConstraint(OdDbMLeaderStyle.SegmentAngleType angle)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setSecondSegmentAngleConstraint(this.swigCPtr, (int)angle);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.SegmentAngleType secondSegmentAngleConstraint()
		{
			OdDbMLeaderStyle.SegmentAngleType result = (OdDbMLeaderStyle.SegmentAngleType)TD_DbPINVOKE.OdDbMLeaderStyle_secondSegmentAngleConstraint(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLeaderLineType(OdDbMLeaderStyle.LeaderType leaderLineType)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setLeaderLineType(this.swigCPtr, (int)leaderLineType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.LeaderType leaderLineType()
		{
			OdDbMLeaderStyle.LeaderType result = (OdDbMLeaderStyle.LeaderType)TD_DbPINVOKE.OdDbMLeaderStyle_leaderLineType(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLeaderLineColor(OdCmColor leaderLineColor)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setLeaderLineColor(this.swigCPtr, OdCmColor.getCPtr(leaderLineColor));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmColor leaderLineColor()
		{
			OdCmColor result = new OdCmColor(TD_DbPINVOKE.OdDbMLeaderStyle_leaderLineColor(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLeaderLineTypeId(OdDbObjectId leaderLineTypeId)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setLeaderLineTypeId(this.swigCPtr, OdDbObjectId.getCPtr(leaderLineTypeId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId leaderLineTypeId()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbMLeaderStyle_leaderLineTypeId(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLeaderLineWeight(LineWeight leaderLineWeight)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setLeaderLineWeight(this.swigCPtr, (int)leaderLineWeight);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public LineWeight leaderLineWeight()
		{
			LineWeight result = (LineWeight)TD_DbPINVOKE.OdDbMLeaderStyle_leaderLineWeight(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setEnableLanding(bool enableLanding)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setEnableLanding(this.swigCPtr, enableLanding);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool enableLanding()
		{
			bool result = TD_DbPINVOKE.OdDbMLeaderStyle_enableLanding(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setLandingGap(double landingGap)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setLandingGap(this.swigCPtr, landingGap);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double landingGap()
		{
			double result = TD_DbPINVOKE.OdDbMLeaderStyle_landingGap(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setEnableDogleg(bool enableDogleg)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setEnableDogleg(this.swigCPtr, enableDogleg);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool enableDogleg()
		{
			bool result = TD_DbPINVOKE.OdDbMLeaderStyle_enableDogleg(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDoglegLength(double doglegLength)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setDoglegLength(this.swigCPtr, doglegLength);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double doglegLength()
		{
			double result = TD_DbPINVOKE.OdDbMLeaderStyle_doglegLength(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setArrowSymbolId(string name)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setArrowSymbolId__SWIG_0(this.swigCPtr, name);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setArrowSymbolId(OdDbObjectId arrowSymbolId)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setArrowSymbolId__SWIG_1(this.swigCPtr, OdDbObjectId.getCPtr(arrowSymbolId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId arrowSymbolId()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbMLeaderStyle_arrowSymbolId(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setArrowSize(double arrowSize)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setArrowSize(this.swigCPtr, arrowSize);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double arrowSize()
		{
			double result = TD_DbPINVOKE.OdDbMLeaderStyle_arrowSize(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDefaultMText(OdDbMText defaultMText)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setDefaultMText(this.swigCPtr, OdDbMText.getCPtr(defaultMText));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMText defaultMText()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbMLeaderStyle_defaultMText(this.swigCPtr);
			OdDbMText result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbMText)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbMText)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbMText)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTextStyleId(OdDbObjectId textStyleId)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setTextStyleId(this.swigCPtr, OdDbObjectId.getCPtr(textStyleId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId textStyleId()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbMLeaderStyle_textStyleId(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTextAttachmentType(OdDbMLeaderStyle.TextAttachmentType textAttachmentType, OdDbMLeaderStyle.LeaderDirectionType leaderDirection)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setTextAttachmentType(this.swigCPtr, (int)textAttachmentType, (int)leaderDirection);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.TextAttachmentType textAttachmentType(OdDbMLeaderStyle.LeaderDirectionType leaderDirection)
		{
			OdDbMLeaderStyle.TextAttachmentType result = (OdDbMLeaderStyle.TextAttachmentType)TD_DbPINVOKE.OdDbMLeaderStyle_textAttachmentType(this.swigCPtr, (int)leaderDirection);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTextAngleType(OdDbMLeaderStyle.TextAngleType textAngleType)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setTextAngleType(this.swigCPtr, (int)textAngleType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.TextAngleType textAngleType()
		{
			OdDbMLeaderStyle.TextAngleType result = (OdDbMLeaderStyle.TextAngleType)TD_DbPINVOKE.OdDbMLeaderStyle_textAngleType(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTextAlignmentType(OdDbMLeaderStyle.TextAlignmentType textAlignmentType)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setTextAlignmentType(this.swigCPtr, (int)textAlignmentType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.TextAlignmentType textAlignmentType()
		{
			OdDbMLeaderStyle.TextAlignmentType result = (OdDbMLeaderStyle.TextAlignmentType)TD_DbPINVOKE.OdDbMLeaderStyle_textAlignmentType(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTextAlignAlwaysLeft(bool bAlwaysLeft)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setTextAlignAlwaysLeft(this.swigCPtr, bAlwaysLeft);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool textAlignAlwaysLeft()
		{
			bool result = TD_DbPINVOKE.OdDbMLeaderStyle_textAlignAlwaysLeft(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTextColor(OdCmColor textColor)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setTextColor(this.swigCPtr, OdCmColor.getCPtr(textColor));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmColor textColor()
		{
			OdCmColor result = new OdCmColor(TD_DbPINVOKE.OdDbMLeaderStyle_textColor(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTextHeight(double textHeight)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setTextHeight(this.swigCPtr, textHeight);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double textHeight()
		{
			double result = TD_DbPINVOKE.OdDbMLeaderStyle_textHeight(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setEnableFrameText(bool enableFrameText)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setEnableFrameText(this.swigCPtr, enableFrameText);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool enableFrameText()
		{
			bool result = TD_DbPINVOKE.OdDbMLeaderStyle_enableFrameText(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setAlignSpace(double alignSpace)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setAlignSpace(this.swigCPtr, alignSpace);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double alignSpace()
		{
			double result = TD_DbPINVOKE.OdDbMLeaderStyle_alignSpace(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBlockId(string name)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setBlockId__SWIG_0(this.swigCPtr, name);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void setBlockId(OdDbObjectId blockId)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setBlockId__SWIG_1(this.swigCPtr, OdDbObjectId.getCPtr(blockId));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbObjectId blockId()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbMLeaderStyle_blockId(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBlockColor(OdCmColor blockColor)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setBlockColor(this.swigCPtr, OdCmColor.getCPtr(blockColor));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmColor blockColor()
		{
			OdCmColor result = new OdCmColor(TD_DbPINVOKE.OdDbMLeaderStyle_blockColor(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBlockScale(OdGeScale3d scale)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setBlockScale(this.swigCPtr, OdGeScale3d.getCPtr(scale));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeScale3d blockScale()
		{
			OdGeScale3d result = new OdGeScale3d(TD_DbPINVOKE.OdDbMLeaderStyle_blockScale(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setEnableBlockScale(bool enableBlockScale)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setEnableBlockScale(this.swigCPtr, enableBlockScale);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool enableBlockScale()
		{
			bool result = TD_DbPINVOKE.OdDbMLeaderStyle_enableBlockScale(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBlockRotation(double rotation)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setBlockRotation(this.swigCPtr, rotation);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double blockRotation()
		{
			double result = TD_DbPINVOKE.OdDbMLeaderStyle_blockRotation(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setEnableBlockRotation(bool enableBlockRotation)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setEnableBlockRotation(this.swigCPtr, enableBlockRotation);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool enableBlockRotation()
		{
			bool result = TD_DbPINVOKE.OdDbMLeaderStyle_enableBlockRotation(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBlockConnectionType(OdDbMLeaderStyle.BlockConnectionType blockConnectionType)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setBlockConnectionType(this.swigCPtr, (int)blockConnectionType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.BlockConnectionType blockConnectionType()
		{
			OdDbMLeaderStyle.BlockConnectionType result = (OdDbMLeaderStyle.BlockConnectionType)TD_DbPINVOKE.OdDbMLeaderStyle_blockConnectionType(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setScale(double scale)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setScale(this.swigCPtr, scale);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double scale()
		{
			double result = TD_DbPINVOKE.OdDbMLeaderStyle_scale(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool overwritePropChanged()
		{
			bool result = TD_DbPINVOKE.OdDbMLeaderStyle_overwritePropChanged(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbObjectId postMLeaderStyleToDb(OdDbDatabase pDb, string styleName)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbMLeaderStyle_postMLeaderStyleToDb(this.swigCPtr, OdDbDatabase.getCPtr(pDb), styleName);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setAnnotative(bool isAnnotative)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setAnnotative(this.swigCPtr, isAnnotative);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool annotative()
		{
			bool result = TD_DbPINVOKE.OdDbMLeaderStyle_annotative(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setBreakSize(double size)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setBreakSize(this.swigCPtr, size);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double breakSize()
		{
			double result = TD_DbPINVOKE.OdDbMLeaderStyle_breakSize(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setTextAttachmentDirection(OdDbMLeaderStyle.TextAttachmentDirection direction)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setTextAttachmentDirection(this.swigCPtr, (int)direction);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbMLeaderStyle.TextAttachmentDirection textAttachmentDirection()
		{
			OdDbMLeaderStyle.TextAttachmentDirection result = (OdDbMLeaderStyle.TextAttachmentDirection)TD_DbPINVOKE.OdDbMLeaderStyle_textAttachmentDirection(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setExtendLeaderToText(bool bSet)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_setExtendLeaderToText(this.swigCPtr, bSet);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool extendLeaderToText()
		{
			bool result = TD_DbPINVOKE.OdDbMLeaderStyle_extendLeaderToText(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult dwgInFields(OdDbDwgFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeaderStyle_dwgInFields(this.swigCPtr, OdDbDwgFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dwgOutFields(OdDbDwgFiler pFiler)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_dwgOutFields(this.swigCPtr, OdDbDwgFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dxfInFields(OdDbDxfFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeaderStyle_dxfInFields(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dxfOutFields(OdDbDxfFiler pFiler)
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_dxfOutFields(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void subClose()
		{
			TD_DbPINVOKE.OdDbMLeaderStyle_subClose(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public virtual OdResult subGetClassID(IntPtr pClsid)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbMLeaderStyle_subGetClassID(this.swigCPtr, pClsid);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		public enum ContentType
		{
			kNoneContent,
			kBlockContent,
			kMTextContent,
			kToleranceContent
		}

		public enum DrawMLeaderOrderType
		{
			kDrawContentFirst,
			kDrawLeaderFirst
		}

		public enum DrawLeaderOrderType
		{
			kDrawLeaderHeadFirst,
			kDrawLeaderTailFirst
		}

		public enum LeaderType
		{
			kInVisibleLeader,
			kStraightLeader,
			kSplineLeader
		}

		public enum TextAttachmentDirection
		{
			kAttachmentHorizontal,
			kAttachmentVertical
		}

		public enum TextAttachmentType
		{
			kAttachmentTopOfTop,
			kAttachmentMiddleOfTop,
			kAttachmentMiddle,
			kAttachmentMiddleOfBottom,
			kAttachmentBottomOfBottom,
			kAttachmentBottomLine,
			kAttachmentBottomOfTopLine,
			kAttachmentBottomOfTop,
			kAttachmentAllLine,
			kAttachmentCenter,
			kAttachmentLinedCenter
		}

		public enum TextAngleType
		{
			kInsertAngle,
			kHorizontalAngle,
			kAlwaysRightReadingAngle
		}

		public enum TextAlignmentType
		{
			kLeftAlignment,
			kCenterAlignment,
			kRightAlignment
		}

		public enum BlockConnectionType
		{
			kConnectExtents,
			kConnectBase
		}

		public enum LeaderDirectionType
		{
			kUnknownLeader,
			kLeftLeader,
			kRightLeader,
			kTopLeader,
			kBottomLeader
		}

		public enum SegmentAngleType
		{
			kAny,
			k15,
			k30,
			k45,
			k60,
			k90 = 6,
			kHorz = 12
		}
	}
}
